<template>
	<view class="p-30">
		<!-- 轮播图 -->
		<u-swiper :list="swiperData" keyName="image"></u-swiper>
		<view class="card p-30 mt-30">
			公告
		</view>
		<view class="card p-30 mt-30">
			监控
		</view>
		<view url="/pages/teacher/student" class="card p-30 mt-30 flex-row justify-between align-center">
			<view class="">
				班级信息
			</view>
			<view class="" @click="select">
				选择
			</view>
		</view>

		<page-tabbar :value="0" />
		<select-info ref="selectInfo" />
	</view>
</template>

<script>
	import {
		swiperList
	} from '@/common/api.js'
	import commonMixin from '@/mixins/common.js';
	export default {
		mixins: [commonMixin],
		data() {
			return {
				swiperData: []
			}
		},
		onLoad() {
			this.initData()

		},
		methods: {
			select() {
				this.$refs.selectInfo.show = true
			},
			initData() {
				swiperList().then(res => {
					console.log('res', res);
					this.swiperData = res
				})
			},
		}
	}
</script>